#include "url.h"
#include "global.h"

char *url_get_host(char *url)
{
	char *p, *q;

	p = strdup(url);
	for (p += 7, q = p; *q != '/'; q++);
	*q = '\0';

	return p;
}

char *url_get_path(char *url)
{
	char	*p;

	p = strdup(url);
	for (p += 7; *p != '/'; p++);

	return p;
}
